package com.acme.bankapp.domain.bank;


public class Client {
	private final static String mr = "Mr.";
	private final static String ms = "Ms.";

	public Account accountS;
	public Account accountC;
	private String name;
	private Gender gender;

	private enum Gender {
		MALE(mr), FEMALE(ms);

		private String salutate;

		Gender(String salutate) {
			this.salutate = salutate;
		}

		private String getSalutation() {
			return salutate;
		}
	}

	public Client(final double amountS, final double amountC,
			final double withdraw, String name, boolean gender) {
		this.accountS = new SavingAccount(amountS);
		this.accountC = new CheckingAccount(amountC, withdraw);
		this.name = name;
		if (gender == true) {
			this.gender = Gender.MALE;
		} else {
			this.gender = Gender.FEMALE;
		}
	}

	public void getClientSalutation() {
		System.out.println(gender.getSalutation() + name);
	}

}
